#include <QApplication>

#include "DGVImageVTK.h"
#include "DGVImage.h"

#include "vtkImageDataGeometryFilter.h"
#include "vtkWarpScalar.h"
#include "vtkMergeFilter.h"
#include "vtkPolyDataNormals.h"
#include "vtkPolyDataMapper.h"
#include "vtkActor.h"
#include "vtkRenderer.h"
#include "vtkRenderWindow.h"

int main(int argc, char *argv[])
{
	QApplication app(argc,argv);
	DGVImageVTK image;

	QString filename = QFileDialog::getOpenFileName(&image,
                           QObject::tr("Select File to Open"),
                           ".",
                           QObject::tr("Images (*.png *.pbm *.ppm *.pgm *.jpeg *.jpg *.bmp *.tiff *.tif)\nMedical Images (*.dcm *.dicom)"));

	if(!filename.isEmpty())
	{
		image.openImage(filename);
		image.adjustSize();
		image.show();

		return app.exec();
	}
	else
	{
		cerr << "Error in Filename. Aborting." << endl;
		return EXIT_FAILURE;
	}
}
